package com.ssy.lingxi.platform.manage.entity.content;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 会员广告实体类
 * @author hsl
 * @version 2.0.0
 * @date 2022/03/11
 */
@Data
@Entity
@Table(schema = "public", name = "man_member_advert",indexes = {@Index(name = "man_member_advert_create_member_id_create_member_role_id_idx",columnList = "createMemberId,createMemberRoleId"),
        @Index(name = "man_member_advert_column_type_idx",columnList = "columnType"),
        @Index(name = "man_member_advert_status_idx",columnList = "status"),
        @Index(name = "man_member_advert_sort_idx",columnList = "sort")})
public class MemberAdvert implements Serializable {
    private static final long serialVersionUID = 1765985088652071890L;

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "member_advert_seq")
    @SequenceGenerator(sequenceName = "man_member_advert_seq", name = "member_advert_seq", allocationSize = 1)
    private Long id;

    /**
     * 标题
     */
    @Column(columnDefinition = "varchar(30)")
    private String title;

    /**
     * 栏目WEB： 1-企业采购首页 -- 轮播广告
     *          2-企业采购首页 -- 顶部广告栏
     *          3.采购商机页 -- 右侧广告栏
     * */
    private Integer columnType;

    /**
     * 广告排序
     */
    private Integer sort;

    /**
     * 跳转链接
     */
    private String link;

    /**
     * 广告图片
     */
    private String imageUrl;

    /**
     * 状态 1-待上架 2-已上架 3-已下架
     */
    private Integer status = 1;

    /**
     * 创建会员id
     */
    private Long createMemberId;

    /**
     * 创建会员角色id
     */
    private Long createMemberRoleId;

    /**
     * 创建时间
     */
    private Long createTime = System.currentTimeMillis();
}
